//map-option.js
export default {
  tooltip: {
    trigger: 'item'
  },
  dataRange: {
    min: 0,
    calculable: true,
    show: false,
    inRange: {
      color: ['#8dc7c9', '#8bd888', '#5cdc89', '#2e8cee',]
    },
    seriesIndex: 0
  },
  grid: {
    left: '0%',
    right: '0%',
    bottom: '0%',
    top: '0%',
    containLabel: true
  },
  geo: {
    type: 'map',
    map: '浙江',
    right: '10%',
    left: 'auto',
    top: 'auto',
    bottom: '8%',
  },
  series: [
    {
      right: '10%',
      left: 'auto',
      top: 'auto',
      bottom: '8%',
      name: '规划数量',
      type: 'map',
      map: '浙江',
      selectedMode: 'single',
      roam: false,
      itemStyle: {
        normal: { label: { show: true } },
        emphasis: { label: { show: true } }
      },
      label: {
        normal: {
          show: true,
          formatter: function (params) {
            if (params.data) {
              var text = params.data.name + "\n";
              if (params.data.value) {
                text += '' + params.data.value + ''
              }
              return text
            }
          },
          textStyle: {
            fontWeight: 'bolder',
            color: '#fff',
            fontSize: '18'
          }
        }
      },
      data: [

        { name: '毕节市', value: Math.round(Math.random() * 2500) },
        // { name: '台州市', value: Math.round(Math.random() * 2500) },
        // { name: '杭州市', value: Math.round(Math.random() * 2500) },
        // { name: '温州市', value: Math.round(Math.random() * 2500) },
        // { name: '宁波市', value: Math.round(Math.random() * 2500) },
        // { name: '丽水市', value: Math.round(Math.random() * 2500) },
        // { name: '金华市', value: Math.round(Math.random() * 2500) },
        // { name: '湖州市', value: Math.round(Math.random() * 2500) },
        // { name: '嘉兴市', value: Math.round(Math.random() * 2500) },
        // { name: '绍兴市', value: Math.round(Math.random() * 2500) },
        // { name: '舟山市', value: Math.round(Math.random() * 2500) },
        // { name: '衢州市', value: Math.round(Math.random() * 2500) },
      ]
    },
    { // 含引导线的省份，用lines实现
      type: 'lines',
      symbol: 'circle',
      silent: true,
      zlevel: 99,
      symbolSize: [6, 4],
      effect: {
        color: '#fff',
      },
      emphasis: {
        lineStyle: {
          shadowBlur: 3,
          color: '#fff',
          shadowColor: '#fff'
        },
      },
      label: {
        show: true,
        formatter: '{b}',
        textStyle: {
          fontWeight: 'bolder',
          color: '#fff',
          fontSize: '18'
        }
      },
      lineStyle: {
        shadowBlur: 3,
        color: '#fff',
        shadowColor: '#fff'
      },
      data: '',
    },
  ]
};